package com.example.invoicingsystem.service.impl;
import com.example.invoicingsystem.mapper.ProductMapper;
import com.example.invoicingsystem.pojo.Product;
import com.example.invoicingsystem.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
	@Autowired
	private ProductMapper productMapper;

	/**
	 * 查询用户全部结果
	 *
	 * @return
	 */
	@Override
	public List<Product> selectAll() {
		return productMapper.selectAll();
	}
	public List<Product> select(Product product) {
		return productMapper.select(product);
	}
	public int insert(Product product) {
		return productMapper.insert(product);
	}
	public int update(Product product) {
		return productMapper.updateByPrimaryKey(product);
	}
	public int delete(Product product) {
		return productMapper.deleteByPrimaryKey(product);
	}

}
